class CreateTables < ActiveRecord::Migration
  def self.up
    
    # Users
    create_table :users do |t|
      t.column :name, :string
      t.column :full_name, :string
      t.column :email_address, :string
      t.column :role_id, :int
    end
    
    # Roles
    create_table :roles do |t|
      t.column :name, :string
    end
    
    # Posts
    create_table :posts do |t|
      t.column :title, :string
      t.column :abstract, :text
      t.column :body, :text
      t.column :user_id, :string
      t.column :posted_at, :datetime
    end
    
  end
  
  def self.down
    drop_table :users
    drop_table :roles
    drop_table :posts
  end
end
